define(
   [
      'dojo/_base/declare',
      'dojo/_base/lang',
      'dojo/Evented'
   ],
   function(declare, lang, Evented)
   {
      return declare([Evented],
      {
         host: '',
         port: 0,
         constructor:function(args)
         {
            dojo.safeMixin(this, args);
         },
         postscript: function(args)
         {
            this.inherited(arguments);

            //Child connections implement setup here.
         },
         //Child connections must implement this function.
         write: function(jsonStr)
         {
         },
         //Child connections must implement this function.
         close: function()
         {
         },
         onClose: function()
         {
            this.emit("connectionClosed");
         },
         onMessage: function(data)
         {
            this.emit("connectionMessage", data);
         }
      });
   }
);
